Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #3017

Merged
merged 11 commits into from
Oct 16, 2023
Merged

Update dependencies #3017

merged 11 commits into from
Oct 16, 2023

Conversation

henrikhorluck
Copy link
Member

  • Upgrade to python 3.11
  • Upgrade pre-commit setup
  • Prep for django 4.0 by removing direct pytz usage
  • Upgrade most Python packages

- Does not upgrade other dependencies, might not actually work in
  isolation
- Django 4.0 changes the default timezone implementation to be zoneinfo
  from the standard library, instead of pytz, we can therefore remove it
  as a direct dependency.
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Merging #3017 (57578ee) into main (78a945c) will increase coverage by 0.05%.
The diff coverage is 85.00%.

❗ Current head 57578ee differs from pull request most recent head 62d41f0. Consider uploading reports for the commit 62d41f0 to get more accurate results

@@            Coverage Diff             @@
##             main    #3017      +/-   ##
==========================================
+ Coverage   78.66%   78.72%   +0.05%     
==========================================
  Files         338      338              
  Lines       14940    15006      +66     
==========================================
+ Hits        11753    11813      +60     
- Misses       3187     3193       +6     
Files Coverage Δ
apps/approval/api/serializers.py 89.69% <ø> (ø)
apps/approval/api/views.py 96.77% <ø> (ø)
apps/approval/dashboard/views.py 41.72% <ø> (ø)
apps/article/admin.py 63.15% <ø> (ø)
apps/article/tests.py 100.00% <100.00%> (ø)
apps/article/views.py 94.87% <ø> (ø)
apps/authentication/dashboard/views.py 49.33% <ø> (ø)
apps/authentication/tasks.py 96.72% <ø> (ø)
apps/careeropportunity/dashboard/views.py 33.33% <ø> (ø)
apps/careeropportunity/forms.py 100.00% <ø> (ø)
... and 31 more

... and 12 files with indirect coverage changes

Copy link
Contributor

@henrikskog henrikskog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! 🚀

- Use npm instead of yarn 1, I don't have a strong opinion here and can
  split it out/revert it
- This removes a lot of the DX for building the frontend locally, but
  noone has used than in a long while, and it is a lot less work to
  remove it than figure out how to get it properly working at this
  point.
- This probably requires additional changes before prod deploy works,
  and upgrades linting, but does not change any code to make it pass CI
- 'Urls' is just a global variable injected through Django-templates,
  there is a js-library we could use, but that would have be bad for
  performance since you have to request a .json file at runtime, and
  probably use async, which is a lot of code-changes.
- Esbuild is less config and dependencies than webpack, this does lose
some hot-reloading abilities, but that should be mitigated by using
--watch, and esbuild is wildly more performant than webpack
- Ideally we would yeet `less` for plain css, but that is a bit more
  work for now.
- We now consequently use LTS node 18
- The usage of `~` is imports in `less` appears to be deprecated (?),
  they had to be changed for esbuild to work at least.
- Creating the webpack-stats.json-build from esbuild's `meta.json` is
  kinda wacky, we could also just for django-webpack-loader to support
  `meta.json`, the whole frontend-setup is strange anyways.
- It should only be added if `--no-optional` is used in prod, which it
  isn't
@henrikhorluck henrikhorluck enabled auto-merge (rebase) October 16, 2023 11:29
@henrikhorluck henrikhorluck merged commit e8d10e8 into main Oct 16, 2023
6 of 7 checks passed
@henrikhorluck henrikhorluck deleted the chore/keep-up-to-date branch October 16, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants